Statements are executed conditionally using C's 'if' statement. Its syntax is simply:
if (expression)
statement1
else
statement2
where the 'else' clause is optional. If the expression is non-zero (true) then statement1 is executed, else statement2 (if present) is executed. The statements may be simple expression statements or compound statements. For clarity it is important to indent the statements (typically one tab stop or 4 characters).
Since C is permissive about the use of "white space" (spaces, tabs, new-line characters), there are several popular placements for the opening and closing braces of compound statements. Some programmers place the opening brace at the end of the line containing the 'if' and 'else' statements, while others prefer to indent both the opening and closing braces by the same amount as in the example below.